import request from '@/utils/request'

// 查询代建清单列表
export function listBoq(query) {
  return request({
    url: '/agency/boq/list',
    method: 'get',
    params: query
  })
}

// 查询代建清单详细
export function getBoq(id) {
  return request({
    url: '/agency/boq/' + id,
    method: 'get'
  })
}

// 新增代建清单
export function syncBoq(data) {
  return request({
    url: '/agency/boq/sync',
    method: 'post',
    data: data
  })
}

// 查询清单树形列表
export function getTreeList(query) {
  return request({
    url: '/agency/boq/getTreeList',
    method: 'get',
    params: query
  })
}

// 查询清单列表--不包含子项
export function getTreeListExcludeChild(query) {
  return request({
    url: '/agency/boq/getTreeListExcludeChild',
    method: 'get',
    params: query
  })
}

// 新增代建清单
export function addBoq(data) {
  return request({
    url: '/agency/boq',
    method: 'post',
    data: data
  })
}

// 修改代建清单
export function updateBoq(data) {
  return request({
    url: '/agency/boq',
    method: 'put',
    data: data
  })
}

// 删除代建清单
export function delBoq(id) {
  return request({
    url: '/agency/boq/' + id,
    method: 'delete'
  })
}
